//
//  CDisCellView.m
//  HCHK_iphone
//
//  Created by yilong zhang on 11-12-9.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "CDisCellView.h"

@implementation CDisCellView

@synthesize m_Source;
@synthesize m_Item;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier Size:(CGSize)size IconDic:(int)dic
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    { 
        self.backgroundColor = [UIColor clearColor];
        self.autoresizesSubviews = YES;
        
        m_Item = [[CDisItemView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height-10) Name:nil Content:nil Time:nil IconDic:dic];
        [self addSubview:m_Item];
        [m_Item release];
    }
    
    return self;
}

-(void)layoutSubviews
{
    m_Item.frame = CGRectMake(0, m_Item.frame.origin.y, self.frame.size.width, self.frame.size.height-10);
    [m_Item setNeedsLayout];
}


// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
/*- (void)drawRect:(CGRect)rect
{
    // Drawing code
    m_Item.frame = CGRectMake(2, m_Item.frame.origin.y, self.frame.size.width-4, self.frame.size.height);
}*/


@end
